home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.qualcomm.com
/
2014.06.ftp.qualcomm.com.tar
/
ftp.qualcomm.com
/
eudora
/
developers
/
emsapi
/
carbon_emsapi.sit.hqx
/
Macintosh API Support
/
emsapi-mac.h
< prev
next >
Wrap
Text File
|
2001-03-08
|
47KB
|
1,003 lines
/* ======================================================================
C header for EMSAPI version 6
Copyright 1996, 1997, 1998, 1999, 2000 QUALCOMM Inc.
Send comments and questions to <emsapi-info@qualcomm.com>
Filename: emsapi-mac.h
USE THIS FILE TO BUILD YOUR MACINTOSH TRANSLATOR COMPONENT.
*/
#if TARGET_API_MAC_CARBON
// I don't want to take out all of the GENERATINGCFMs right now
#undef GENERATINGCFM
#define GENERATINGCFM 0
#endif
#ifndef EMSAPI_MAC_H_INCLUDED
#define EMSAPI_MAC_H_INCLUDED
/* ========== CONSTANTS AND RETURN VALUES ================================ */
/* ----- Translator return codes --- store as a long --------------------- */
#define EMSR_OK (0L) /* The translation operation succeeded */
#define EMSR_UNKNOWN_FAIL (1L) /* Failed for unspecified reason */
#define EMSR_CANT_TRANS (2L) /* Don't know how to translate this */
#define EMSR_INVALID_TRANS (3L) /* The translator ID given was invalid */
#define EMSR_NO_ENTRY (4L) /* The value requested doesn't exist */
#define EMSR_NO_INPUT_FILE (5L) /* Couldn't find input file */
#define EMSR_CANT_CREATE (6L) /* Couldn't create the output file */
#define EMSR_TRANS_FAILED (7L) /* The translation failed. */
#define EMSR_INVALID (8L) /* Invalid argument(s) given */
#define EMSR_NOT_NOW (9L) /* Translation can be done not in current
context */
#define EMSR_NOW (10L) /* Indicates translation can be performed
right away */
#define EMSR_ABORTED (11L) /* Translation was aborted by user */
#define EMSR_DATA_UNCHANGED (12L) /* Trans OK, data was not changed */
#define EMSR_NOT_INTERESTED (13L) /* V4! Peanut Not now, but not in DISPLAY? */
#define EMSR_USER_CANCELLED (14L) /* V4 User cancelled */
/* ----- Translator types --- store as a long ---------------------------- */
#define EMST_NO_TYPE (-1L)
#define EMST_LANGUAGE (0x10L)
#define EMST_TEXT_FORMAT (0x20L)
#define EMST_GRAPHIC_FORMAT (0x30L)
#define EMST_COMPRESSION (0x40L)
#define EMST_COALESCED (0x50L)
#define EMST_SIGNATURE (0x60L)
#define EMST_PREPROCESS (0x70L)
#define EMST_CERT_MANAGEMENT (0x80L)
#define EMST_IMPORTER (0x90L)
/* ----- Translator info flags and contexts --- store as a long ---------- */
/* Used both as bit flags and as constants */
#define EMSF_ON_ARRIVAL (0x0001L) /* Call on message arrivial */
#define EMSF_ON_DISPLAY (0x0002L) /* Call when user views message */
#define EMSF_ON_REQUEST (0x0004L) /* Call when selected from menu */
#define EMSF_Q4_COMPLETION (0x0008L) /* Queue and call on complete
composition of a message */
#define EMSF_Q4_TRANSMISSION (0x0010L) /* Queue and call on transmission
of a message */
#define EMSF_WHOLE_MESSAGE (0x0200L) /* Works on the whole message even if
it has sub-parts. (e.g. signature) */
#define EMSF_REQUIRES_MIME (0x0400L) /* Items presented for translation
should be MIME entities with
canonical end of line representation,
proper transfer encoding
and headers */
#define EMSF_GENERATES_MIME (0x0800L) /* Data produced will be MIME format */
#define EMSF_ALL_HEADERS (0x1000L) /* All headers in & out of trans when
MIME format is used */
#define EMSF_BASIC_HEADERS (0x2000L) /* Just the basic to, from, subject, cc,b
cc headers */
#define EMSF_DEFAULT_Q_ON (0x4000L) /* Causes queued translation to be on
for a new message by default */
#define EMSF_TOOLBAR_PRESENCE (0x8000L) /* Appear on the Toolbar */
#define EMSF_ALL_TEXT (0x10000L) /* All text instead of current selection for ON_REQUEST */
#define EMSF_DONTSAVE (0x80000000) /* Mark messages as unchanged so user
is not prompted for save. Add to any
return code */
/* ----- The version of the API defined by this include file ------------- */
#define EMS_VERSION (6) /* Used in plugin init */
#define EMS_COMPONENT 'EuTL' /* Macintosh component type */
/* ----- Translator and translator type specific return codes ------------ */
#define EMSC_SIGOK (1L) /* A signature verification succeeded */
#define EMSC_SIGBAD (2L) /* A signature verification failed */
#define EMSC_SIGUNKNOWN (3L) /* Result of verification unknown */
/* ----- V4! Peanut IDLE Events ------------ */
/* Note that it is possible to have both EMIDLE_UI_ALLOWED and EMIDLE_QUICK set, in that
* case the plug-in should only do a UI operation if it's absolutely essential (i.e., errors only).
* If EMIDLE_UI_ALLOWED is NOT set, then using the progress
*/
/* ----- Values for ems_idle flags -------------------------- */
#define EMIDLE_UI_ALLOWED (1L) /* Interactions with user are allowed */
#define EMIDLE_QUICK (2L) /* Now is NOT the time to do something lengthy */
#define EMIDLE_OFFLINE (4L) /* Eudora is in "offline" mode */
#define EMIDLE_PRE_SEND (8L) /* Eudora is about to send mail */
#define EMIDLE_TRANSFERRING (16L) /* Eudora is transferring mail */
/* ----- NEW - Values for emsStandardGetMailBox flags -------------------------- */
#define EMSFGETMBOX_ALLOW_NEW (1L) /* Allow creation of new mailboxes */
#define EMSFGETMBOX_ALLOW_OTHER (2L) /* Allow selection of "other" mailboxes */
// start MODELESS EMSAPI
#define EMS_PW_WINDOWKIND (99)
// Constants (and bitfields) for special menu commands a plugin can access
// File Menu
#define EMS_MENU_FILE_CLOSE (0x0010000)
#define EMS_MENU_FILE_SAVE (0x0020000)
// Edit Menu
#define EMS_MENU_EDIT_UNDO (0x0100000)
#define EMS_MENU_EDIT_CUT (0x0200000)
#define EMS_MENU_EDIT_COPY (0x0400000)
#define EMS_MENU_EDIT_PASTE (0x0800000)
#define EMS_MENU_EDIT_CLEAR (0x1000000)
#define EMS_MENU_EDIT_SELECTALL (0x2000000)
// end MODELESS EMSAPI
/* ----- Progress Data ---------------------------- */
typedef struct emsProgressDataS {
long size; /* Size of this data structure */
long value; /* Range of Progress, percent complete */
StringPtr message; /* Progress Message */
} emsProgressData;
/* ========== POWER PC/68K GLUE FOR CALL BACKS ====================== */
/* These can be treated as magic type declarations and just passed on
to the functins below. They are the thing that Eudora passes to
the component to indicate where the call back function is.
*/
#if GENERATINGCFM
typedef UniversalProcPtr emsProgress, emsProgressUPP; /* Power PC */
enum { emsProgressProcInfo = kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(short)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(emsProgressData*))) };
#define NewEMSProgressProc(userRoutine) \
(emsProgressUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
emsProgressProcInfo, GetCurrentArchitecture())
#define CallEMSProgressProc(userRoutine, data) \
CallUniversalProc((UniversalProcPtr)(userRoutine), emsProgressProcInfo, (data))
#else
typedef pascal short (*emsProgress)(emsProgressData *); /* 68K */
#define NewEMSProgressProc(userRoutine) ((emsProgressUPP) (userRoutine)))
#define CallEMSProgressProc(userRoutine, data) (*(userRoutine))((data))
#endif
typedef struct emsStandardGetMailBoxDataS *emsStandardGetMailBoxDataP, **emsStandardGetMailBoxDataH;
#if GENERATINGCFM
typedef UniversalProcPtr emsGetMailBox, emsGetMailBoxUPP;
enum { emsGetMailBoxProcInfo = kPascalStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(emsStandardGetMailBoxDataP))) };
#define NewEMSGetMailBoxProc(userRoutine) \
(emsGetMailBoxUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
emsGetMailBoxProcInfo, GetCurrentArchitecture())
#define CallEMSGetMailProc(userRoutine, data) \
CallUniversalProc((UniversalProcPtr)(userRoutine), emsGetMailBoxProcInfo, (data))
#else
typedef pascal void (*emsGetMailBox)(emsStandardGetMailBoxDataP getMailBoxData);
#define NewEMSGetMailBoxProc(userRoutine) ((emsGetMailBoxUPP)(userRoutine))
#define CallEMSGetMailProc(userRoutine, data) (*(userRoutine))((data))
#endif
typedef struct emsSetMailBoxTagDataS *emsSetMailBoxTagDataP, **emsSetMailBoxTagDataH;
#if GENERATINGCFM
typedef UniversalProcPtr emsSetMailBoxTag, emsSetMailBoxTagUPP;
enum { emsSetMailBoxTagProcInfo = kPascalStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(emsSetMailBoxTagDataP))) };
#define NewEMSSetMailBoxTagProc(userRoutine) \
(emsSetMailBoxTagUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
emsSetMailBoxTagProcInfo, GetCurrentArchitecture())
#define CallEMSSetMailBoxTagProc(userRoutine, data) \
CallUniversalProc((UniversalProcPtr)(userRoutine), emsSetMailBoxTagProcInfo, (data))
#else
typedef pascal void (*emsSetMailBoxTag)(emsSetMailBoxTagDataP setMailBoxTagData);
#define NewEMSSetMailBoxTagProc(userRoutine) ((emsSetMailBoxTagUPP)(userRoutine))
#define CallEMSSetMailBoxTagProc(userRoutine, data) (*(userRoutine))((data))
#endif
#if GENERATINGCFM
typedef UniversalProcPtr emsGetMailBoxTag, emsGetMailBoxTagUPP;
enum { emsGetMailBoxTagProcInfo = kPascalStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(emsSetMailBoxTagDataP))) };
#define NewEMSGetMailBoxTagProc(userRoutine) \
(emsGetMailBoxTagUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
emsGetMailBoxTagProcInfo, GetCurrentArchitecture())
#define CallEMSGetMailBoxTagProc(userRoutine, data) \
CallUniversalProc((UniversalProcPtr)(userRoutine), emsGetMailBoxTagProcInfo, (data))
#else
typedef pascal void (*emsGetMailBoxTag)(emsSetMailBoxTagDataP setMailBoxTagData);
#define NewEMSGetMailBoxTagProc(userRoutine) ((emsGetMailBoxTagUPP)(userRoutine))
#define CallEMSGetMailBoxTagProc(userRoutine, data) (*(userRoutine))((data))
#endif
typedef struct emsGetPersonalityDataS *emsGetPersonalityDataP, **emsGetPersonalityDataH;
#if GENERATINGCFM
typedef UniversalProcPtr emsGetPersonality, emsGetPersonalityUPP;
enum { uppemsGetPersonalityProcInfo = kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(short)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(emsGetPersonalityDataP))) };
#define NewEMSGetPersonalityProc(userRoutine) \
(uppemsGetPersonalityProcInfo) NewRoutineDescriptor((ProcPtr)(userRoutine), \
emsGetPersonalityProcInfo, GetCurrentArchitecture())
#define CallEMSGetPersonalityProc(userRoutine, data) \
CallUniversalProc((UniversalProcPtr)(userRoutine), uppemsGetPersonalityProcInfo, (data))
#else
typedef pascal short (*emsGetPersonality)(emsGetPersonalityDataP getPersonalityData);
#define NewEMSGetPersonalityProc(userRoutine) ((uppemsGetPersonalityProcInfo)(userRoutine))
#define CallEMSGetPersonalityProc(userRoutine, data) (*(userRoutine))((data))
#endif
typedef struct emsGetPersonalityInfoDataS *emsGetPersonalityInfoDataP, **emsGetPersonalityInfoDataH;
#if GENERATINGCFM
typedef UniversalProcPtr emsGetPersonalityInfo, emsGetPersonalityInfoUPP;
enum { uppemsGetPersonalityInfoProcInfo = kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(short)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(emsGetPersonalityInfoDataP))) };
#define NewEMSGetPersonalityInfoProc(userRoutine) \
(uppemsGetPersonalityInfoProcInfo) NewRoutineDescriptor((ProcPtr)(userRoutine), \
emsGetPersonalityInfoProcInfo, GetCurrentArchitecture())
#define CallEMSGetPersonalityInfoProc(userRoutine, data) \
CallUniversalProc((UniversalProcPtr)(userRoutine), uppemsGetPersonalityInfoProcInfo, (data))
#else
typedef pascal short (*emsGetPersonalityInfo)(emsGetPersonalityInfoDataP getPersonalityData);
#define NewEMSGetPersonalityInfoProc(userRoutine) ((uppemsGetPersonalityInfoProcInfo)(userRoutine))
#define CallEMSGetPersonalityInfoProc(userRoutine, data) (*(userRoutine))((data))
#endif
typedef struct emsRegenerateDataS *emsRegenerateDataP, **emsRegenerateDataH;
#if GENERATINGCFM
typedef UniversalProcPtr emsRegenerate, emsRegenerateUPP;
enum { uppemsRegenerateProcInfo = kPascalStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(emsRegenerateDataP))) };
#define NewEMSRegenerateProc(userRoutine) \
(uppemsRegenerateProcInfo) NewRoutineDescriptor((ProcPtr)(userRoutine), \
emsRegenerateProcInfo, GetCurrentArchitecture())
#define CallEMSRegenerateProc(userRoutine, data) \
CallUniversalProc((UniversalProcPtr)(userRoutine), uppemsRegenerateProcInfo, (data))
#else
typedef pascal short (*emsRegenerate)(emsRegenerateDataP RegenerateData);
#define NewEMSRegenerateProc(userRoutine) ((uppemsRegenerateProcInfo)(userRoutine))
#define CallEMSRegenerateProc(userRoutine, data) (*(userRoutine))((data))
#endif
typedef struct emsGetDirectoryDataS *emsGetDirectoryDataP, **emsGetDirectoryDataH;
#if GENERATINGCFM
typedef UniversalProcPtr emsGetDirectory;
enum { uppemsGetDirectoryProcInfo = kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(short)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(emsGetDirectoryDataP))) };
#define NewEMSGetDirectoryProc(userRoutine) \
(uppemsGetDirectoryProcInfo) NewRoutineDescriptor((ProcPtr)(userRoutine), \
emsGetDirectoryProcInfo, GetCurrentArchitecture())
#define CallEMSGetDirectoryProc(userRoutine, data) \
CallUniversalProc((UniversalProcPtr)(userRoutine), uppemsGetDirectoryProcInfo, (data))
#else
typedef pascal short (*emsGetDirectory)(emsGetDirectoryDataP GetDirectoryData);
#define NewEMSGetDirectoryProc(userRoutine) ((uppemsGetDirectoryProcInfo)(userRoutine))
#define CallEMSGetDirectoryProc(userRoutine, data) (*(userRoutine))((data))
#endif
typedef emsGetDirectory emsGetDirectoryUPP;
#if GENERATINGCFM
typedef UniversalProcPtr emsUpdateWindows, emsUpdateWindowsUPP;
enum { uppemsUpdateWindowsProcInfo = kPascalStackBased };
#define NewEMSUpdateWindowsProc(userRoutine) \
(void) NewRoutineDescriptor((ProcPtr)(userRoutine), \
emsUpdateWindowsProcInfo, GetCurrentArchitecture())
#define CallEMSUpdateWindowsProc(userRoutine) \
CallUniversalProc((UniversalProcPtr)(userRoutine), uppemsUpdateWindowsProcInfo)
#else
typedef pascal void (*emsUpdateWindows)(void);
#define NewEMSUpdateWindowsProc(userRoutine) ((uppemsUpdateWindowsProcInfo)(userRoutine))
#define CallEMSUpdateWindowsProc(userRoutine) (*(userRoutine))()
#endif
// start MODELESS EMSAPI
typedef struct emsPlugwindowDataS *emsPlugwindowDataP, **emsPlugwindowDataH;
#if GENERATINGCFM
typedef UniversalProcPtr emsPlugwindowRegister;
enum { uppemsPlugwindowRegister = kPascalStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(emsPlugwindowDataP))) };
#define NewEMSPlugwindowRegisterProc(userRoutine) \
(uppemsPlugwindowRegisterProcInfo) NewRoutineDescriptor((ProcPtr)(userRoutine), \
emsPlugwindowRegisterProcInfo, GetCurrentArchitecture())
#define CallEMSPlugwindowRegisterProc(userRoutine, data) \
CallUniversalProc((UniversalProcPtr)(userRoutine), uppemsPlugwindowRegisterProcInfo, (data))
#else
typedef pascal short (*emsPlugwindowRegister)(emsPlugwindowDataP PlugwindowRegisterData);
#define NewEMSPlugwindowRegisterProc(userRoutine) ((uppemsPlugwindowRegisterProcInfo)(userRoutine))
#define CallEMSPlugwindowRegisterProc(userRoutine) (*(userRoutine))()
#endif
typedef emsPlugwindowRegister emsPlugwindowRegisterUPP;
#if GENERATINGCFM
typedef UniversalProcPtr emsPlugwindowUnRegister;
enum { uppemsPlugwindowUnRegister = kPascalStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(emsPlugwindowDataP))) };
#define NewEMSPlugwindowUnRegisterProc(userRoutine) \
(uppemsPlugwindowUnRegisterProcInfo) NewRoutineDescriptor((ProcPtr)(userRoutine), \
emsPlugwindowUnRegisterProcInfo, GetCurrentArchitecture())
#define CallEMSPlugwindowUnRegisterProc(userRoutine, data) \
CallUniversalProc((UniversalProcPtr)(userRoutine), uppemsPlugwindowUnRegisterProcInfo, (data))
#else
typedef pascal short (*emsPlugwindowUnRegister)(emsPlugwindowDataP PlugwindowUnRegisterData);
#define NewEMSPlugwindowUnRegisterProc(userRoutine) ((uppemsPlugwindowUnRegisterProcInfo)(userRoutine))
#define CallEMSPlugwindowUnRegisterProc(userRoutine) (*(userRoutine))()
#endif
typedef emsPlugwindowUnRegister emsPlugwindowUnRegisterUPP;
typedef struct emsGDeviceRgnDataS *emsGDeviceRgnDataP, **emsGDeviceRgnDataH;
#if GENERATINGCFM
typedef UniversalProcPtr emsGDeviceRgn;
enum { uppemsGDeviceRgn = kPascalStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(emsGDeviceRgnDataP))) };
#define NewEMSGDeviceRgnProc(userRoutine) \
(uppemsGDeviceRgnProcInfo) NewRoutineDescriptor((ProcPtr)(userRoutine), \
emsGDeviceRgnProcInfo, GetCurrentArchitecture())
#define CallEMSGDeviceRgnProc(userRoutine, data) \
CallUniversalProc((UniversalProcPtr)(userRoutine), uppemsGDeviceRgnProcInfo, (data))
#else
typedef pascal short (*emsGDeviceRgn)(emsGDeviceRgnDataP GDeviceRgnData);
#define NewEMSGDeviceRgnProc(userRoutine) ((uppemsGDeviceRgnProcInfo)(userRoutine))
#define CallEMSGDeviceRgnProc(userRoutine) (*(userRoutine))()
#endif
typedef emsGDeviceRgn emsGDeviceRgnUPP;
// end MODELESS EMSAPI
/* ========== DATA STRUCTURES ============================================ */
/* True Mac-style declarations aren't used yet but are included in comments.
All strings on the Mac are PASCAL strings and all are allocated as Handles.
*/
/* ----- Macintosh: MIME type data passed across the API ----------------- */
/* ----- MIME Params ---------------------------- */
typedef struct emsMIMEparamS *emsMIMEParamP, **emsMIMEparamH;
typedef struct emsMIMEparamS {
long size;
Str63 name; /* MIME parameter name */
Handle value; /* handle size determines string length */
emsMIMEparamH next; /* Handle for next param in list */
} emsMIMEparam;
/* ----- MIME Data ----------------------------- */
typedef struct emsMIMEtypeS *emsMIMEtypeP, **emsMIMEtypeH;
typedef struct emsMIMEtypeS {
long size;
Str63 mimeVersion; /* MIME-Version: header */
Str63 mimeType; /* Top-level MIME type: text,message...*/
Str63 subType; /* sub-type */
emsMIMEparamH params; /* Handle to first parameter in list */
Str63 contentDisp; /* Content-Disposition */
emsMIMEparamH contentParams; /* Handle to first parameter in list */
} emsMIMEtype;
/* ----- User Address ------------------------- */
typedef struct emsAddressS *emsAddressP, **emsAddressH;
typedef struct emsAddressS {
long size; /* Size of this data structure */
StringHandle address; /* Optional directory for config file */
StringHandle realname; /* Users full name from Eudora config */
emsAddressH next; /* Linked list of addresses */
} emsAddress;
/* ----- Header Data ---------------------------- */
typedef struct emsHeaderDataS *emsHeaderDataP, **emsHeaderDataH;
typedef struct emsHeaderDataS {
long size; /* Size of this data structure */
emsAddressH to; /* To Header */
emsAddressH from; /* From Header */
StringPtr *subject; /* Subject Header */
emsAddressH cc; /* cc Header */
emsAddressH bcc; /* bcc Header */
Handle rawHeaders; /* The 822 headers */
} emsHeaderData;
/* ----- NEW - structure to hold the callback functions ------------- */
typedef struct emsCallBackS {
emsGetMailBox EMSStandardGetMailBoxFunction;
emsSetMailBoxTag EMSSetMailBoxTagFunction;
emsGetPersonality EMSStandardGetPersonalityFunction;
emsProgress EMSProgressFunction;
emsRegenerate EMSRegenerateFunction;
emsGetDirectory EMSGetDirectoryFunction;
emsUpdateWindows EMSUpdateWindowsFunction;
emsGetMailBoxTag EMSGetMailBoxTagFunction;
emsGetPersonalityInfo EMSGetPersonalityInfoFunction;
// start MODELESS EMSAPI
emsPlugwindowRegister EMSPlugwindowRegisterFunction;
emsPlugwindowUnRegister EMSPlugwindowUnRegisterFunction;
emsGDeviceRgn EMSGDeviceRgnFunction;
// end MODELESS EMSAPI
} emsCallBack;
/* ----- How Eudora is configured ------------- */
typedef struct emsCallBackS *emsCallBacksP, **emsCallBacksH;
typedef struct emsMailConfigS *emsMailConfigP, **emsMailConfigH;
typedef struct emsMailConfigS {
long size; /* Size of this data structure */
FSSpec configDir; /* Optional directory for config file */
emsAddress userAddr; /* Current users address */
emsCallBack callBacks; /* V4! Peanut - Pointer to callback structure */
} emsMailConfig;
/* ----- Plugin Info -------------------------- */
typedef struct emsPluginInfoS *emsPluginInfoP, **emsPluginInfoH;
typedef struct emsPluginInfoS {
long size; /* Size of this data structure */
long id; /* Place to return unique plugin id */
long numTrans; /* Place to return num of translators */
long numAttachers; /* Place to return num of attach hooks */
long numSpecials; /* Place to return num of special hooks */
StringHandle desc; /* Return for string description of plugin */
Handle icon; /* Return for plugin icon data */
long mem_rqmnt; /* V4! Return Memory Required to run this */
long numMBoxContext; /* V4! Peanut Place to return num of mailbox context hooks */
/* These are shown when the mailbox has a non-zer attribute with the plugin-s ID as key */
long idleTimeFreq; /* V4! Peanut Return 0 for no idle time, otherwise initial idle frequentcy in milliseconds */
long numImporters; /* V6! Place to return num of importer hooks */
} emsPluginInfo;
/* ----- Translator Info --------------------- */
typedef struct emsTranslatorS *emsTranslatorP, **emsTranslatorH;
typedef struct emsTranslatorS {
long size; /* Size of this data structure */
long id; /* ID of translator to get info for */
long type; /* translator type, e.g., EMST_xxx */
unsigned long flags; /* translator flags */
StringHandle desc; /* translator string description */
Handle icon; /* translator icon data */
StringHandle properties; /* Properties for queued translations */
} emsTranslator;
/* ----- Menu Item Info --------------------- */
typedef struct emsMenuS *emsMenuP, **emsMenuH;
typedef struct emsMenuS {
long size; /* Size of this data structure */
long id; /* ID of menu item to get info for */
StringHandle desc; /* translator string description */
Handle icon; /* Icon suite */
unsigned long flags; /* flags (EMSF_TOOLBAR_PRESENCE) */
} emsMenu;
/* ----- Translation Data -------------------- */
typedef struct emsDataFileS *emsDataFileP, **emsDataFileH;
typedef struct emsDataFileS {
long size; /* Size of this data structure */
long context;
emsMIMEtypeH mimeInfo; /* MIME type of data to check */
emsHeaderDataP header; /* EMSF_BASIC_HEADERS & EMSF_ALL_HEADERS determine contents */
FSSpec file; /* The input file name */
} emsDataFile;
/* ----- Resulting Status Data -------------- */
typedef struct emsResultStatusS *emsResultStatusP, **emsResultStatusH;
typedef struct emsResultStatusS {
long size; /* Size of this data structure */
StringHandle desc; /* Returned string for display with the result */
StringHandle error; /* Place to return string with error message */
long code; /* Return for translator-specific result code */
} emsResultStatus;
/* ----- NEW - StandardGetMailBoxFunction Data ---------------------------- */
typedef AliasHandle emsMBoxP;
typedef struct emsStandardGetMailBoxDataS {
long size; /* IN: Size of this data structure */
long flags; /* IN: see flags above */
StringPtr prompt; /* IN: Prompt for user */
emsMBoxP mailbox; /* OUT: the chosen mailbox */
} emsStandardGetMailBoxData;
/* ----- NEW - SetMailBoxTag Data ---------------------------- */
typedef struct emsSetMailBoxTagDataS{
long size; /* IN: Size of this data structure */
emsMBoxP mailbox; /* IN: the selected mailbox */
long key; /* IN: the attribute key (usually the plug-in's ID */
long value; /* IN: the attribute value, zero to clear the attribute */
long oldvalue; /* OUT: the attribute's old value, zero by default */
long oldkey; /* OUT: the attribute's old key, zero by default */
} emsSetMailBoxTagData;
/* ----- NEW - GetPersonality Data ---------------------------- */
typedef struct emsGetPersonalityDataS{
long size; /* IN: Size of this data structure */
StringPtr prompt; /* IN: Prompt for user. Set to nil for standard prompt */
Boolean defaultPers; /* IN: Return default personality */
short persCount; /* OUT: number of personalities available */
emsAddress personality; /* OUT: Address info for selected personality */
StringHandle personalityName;/* OUT: name of personality */
} emsGetPersonalityData;
/* ----- NEW - GetPersonalityInfo Data ---------------------------- */
typedef struct emsGetPersonalityInfoDataS{
long size; /* IN: Size of this data structure */
StringHandle personalityName;/* IN: name of personality */
emsAddress personality; /* OUT: Address info for selected personality */
} emsGetPersonalityInfoData;
/* ----- NEW - Regenerate Data ---------------------------- */
typedef enum { emsRegenerateFilters,emsRegenerateNicknames } RegenerateType;
typedef struct emsRegenerateDataS{
long size; /* IN: Size of this data structure */
RegenerateType which; /* IN: What should Eudora regenerate? */
} emsRegenerateData;
/* ----- NEW - Get Directory Data ---------------------------- */
typedef enum { EMS_EudoraDir, /* Eudora folder, contains all other folders */
EMS_AttachmentsDir, /* Attachments folder */
EMS_PluginFiltersDir, /* Filters folder for plug-ins */
EMS_PluginNicknamesDir, /* Nicknames folder for plug-ins */
EMS_ConfigDir, /* Folder for plug-ins' preferences */
EMS_MailDir, /* Folder containing mailboxes */
EMS_NicknamesDir, /* Eudora nicknames folder */
EMS_SignaturesDir, /* Signatures folder */
EMS_SpoolDir, /* Spool folder */
EMS_StationeryDir /* Stationery folder */
} DirectoryEnum;
typedef struct emsGetDirectoryDataS{
long size; /* IN: Size of this data structure */
DirectoryEnum which; /* IN: Which directory? */
FSSpec directory; /* OUT: FileSpec for directory */
} emsGetDirectoryData;
/* ----- NEW - Idle Data ---------------------------- */
typedef struct emsIdleDataS{
long flags; /* IN: flags */
long *idleTimeFreq; /* IN,OUT: requested idle time */
emsProgress progress; /* IN: Callback function to report progress/check for abort */
} emsIdleData, *emsIdleDataP;
// start MODELESS EMSAPI
typedef struct emsPlugwindowDataS {
long size; /* IN: Size of this data structure */
void* nativeWindow; /* reference to WindowPtr or HWND */
long plugwindowID; /* local id assigned by plug-in */
unsigned long menuMask; /* Mask for menu items to be used */
long top; /* For saving size and position */
long left; /* not used by plug-in except for reopen() */
long bottom;
long right;
long plugin_refcon; /* for plug-in's use, NEVER used by Eudora */
long pluginID; // id of the plug-in
} emsPlugwindowData;
typedef struct emsPlugwindowEventS {
long size; /* IN: Size of this data structure */
void* nativeEvent; /* reference to EventRecord on Mac */
} emsPlugwindowEvent, *emsPlugwindowEventP;
typedef struct emsPlugwindowMenuDataS {
long size; /* IN: Size of this data structure */
unsigned long menuMask; /* Mask for menu item */
} emsMenuData, *emsPlugwindowMenuDataP;
typedef struct emsPlugwindowDragDataS {
long size; /* IN: Size of this data structure */
DragTrackingMessage message; // message of 0xfff means "drop"
DragReference drag; /* drag data */
} emsPlugwindowDragData, *emsPlugwindowDragDataP;
typedef struct emsGDeviceRgnDataS {
long size; /* IN: Size of this data structure */
short gdIndex; /* IN: index of device you want to know about */
RgnHandle usableRgn; /* usable region of the screen */
Rect largestRectangle; /* largest rect available on the screen */
} emsGDeviceRgnData;
// end MODELESS EMSAPI
/* ========== FUNCTION PROTOTYPES ======================================== */
/* ----- Get the API Version number this plugin implements ----------------- */
pascal long ems_plugin_version(
Handle globals, /* Out: Return for allocated instance structure */
short *apiVersion /* Out: Plugin Version */
);
/* ----- Initialize plugin and get its basic info -------------------------- */
pascal long ems_plugin_init(
Handle globals, /* Out: Return for allocated instance structure */
short eudAPIVersion, /* In: The API version eudora is using */
emsMailConfigP mailConfig, /* In: Eudoras mail configuration */
emsPluginInfoP pluginInfo /* Out: Return Plugin Information */
);
/* ----- Get details about a translator in a plugin ------------------------ */
pascal long ems_translator_info(
Handle globals, /* Out: Return for allocated instance structure */
emsTranslatorP transInfo /* In/Out: Return Translator Information */
);
/* ----- Check and see if a translation can be performed ------------------- */
pascal long ems_can_translate(
Handle globals, /* Out: Return for allocated instance structure */
emsTranslatorP trans, /* In: Translator Info */
emsDataFileP inTransData, /* In: What to translate */
emsResultStatusP transStatus /* Out: Translations Status information */
);
/* ----- Actually perform a translation on a file -------------------------- */
pascal long ems_translate_file(
Handle globals, /* Out: Return for allocated instance structure */
emsTranslatorP trans, /* In: Translator Info */
emsDataFileP inFile, /* In: What to translate */
emsProgress progress, /* Func to report progress/check for abort */
emsDataFileP outFile, /* Out: Result of the translation */
emsResultStatusP transStatus /* Out: Translations Status information */
);
/* ----- End use of a plugin and clean up ---------------------------------- */
pascal long ems_plugin_finish(
Handle globals /* Out: Return for allocated instance structure */
);
/* ----- Call the plug-ins configuration Interface ------------------------- */
pascal long ems_plugin_config(
Handle globals, /* Out: Return for allocated instance structure */
emsMailConfigP mailConfig /* In: Eudora mail info */
);
/* ----- Manage properties for queued translations ------------------------- */
pascal long ems_queued_properties(
Handle globals, /* Out: Return for allocated instance structure */
emsTranslatorP trans, /* In/Out: The translator */
long *selected /* In/Out: State of this translator */
);
/* ----- Info about menu hook to attach/insert composed object ------------- */
pascal long ems_attacher_info(
Handle globals, /* Out: Return for allocated instance structure */
emsMenuP attachMenu /* Out: The menu */
);
/* ----- Call an attacher hook to compose some special object -------------- */
pascal long ems_attacher_hook(
Handle globals, /* Out: Return for allocated instance structure */
emsMenuP attachMenu, /* In: The menu */
FSSpec *attachDir, /* In: Location to put attachments */
long *numAttach, /* Out: Number of files attached */
emsDataFileH *attachFiles /* Out: Name of files written */
);
/* ----- Info about special menu items hooks ------------------------------- */
pascal long ems_special_info(
Handle globals, /* Out: Return for allocated instance structure */
emsMenuP specialMenu /* Out: The menu */
);
/* ----- Call a special menu item hook ------------------------------------- */
pascal long ems_special_hook(
Handle globals, /* Out: Return for allocated instance structure */
emsMenuP specialMenu /* In: The menu */
);
/* ----- Idle handline ------------------------------------- */
pascal long ems_idle(
Handle globals, /* Out: Return for allocated instance structure */
emsIdleDataP idleData /* In: data */
);
/* ----- Get context menu ------------------------------------- */
pascal long ems_mbox_context_info(
Handle globals,
emsMenuP mbox_context_Menu
);
/* ----- Handle context menu hit ------------------------------------- */
pascal long ems_mbox_context_hook(
Handle globals,
emsMBoxP mailbox,
emsMenuP mbox_context_Menu
);
// start MODELESS EMSAPI
pascal long ems_plugwindow_close(
Handle globals,
emsPlugwindowDataP data
);
pascal void ems_plugwindow_reopen(
Handle globals,
emsPlugwindowDataP data
);
pascal long ems_plugwindow_event(
Handle globals,
emsPlugwindowDataP data,
emsPlugwindowEventP event
);
pascal void ems_plugwindow_menu_enable(
Handle globals,
emsPlugwindowDataP data,
emsPlugwindowMenuDataP menuData
);
pascal long ems_plugwindow_menu(
Handle globals,
emsPlugwindowDataP data,
emsPlugwindowMenuDataP menuData
);
pascal void ems_plugwindow_drag(
Handle globals,
emsPlugwindowDataP data,
emsPlugwindowDragDataP dragData
);
// end MODELESS EMSAPI
/* ======================================================================= */
/* ========== EMSAPI Importer Plugin Data ================================ */
/* ======================================================================= */
/* ========== POWER PC/68K GLUE FOR CALL BACKS =========================== */
/* ---------- Make Sig data ---------------------------------------------- */
typedef struct emsMakeSigDataS {
long size; /* Size of this data structure */
StringPtr name; /* the name of the signature file */
Handle sigText; /* The text of the signature */
} emsMakeSigData;
/* ---------- Make Address Book data ------------------------------------- */
typedef struct emsMakeAddressBookDataS
{
long size; /* Size of this data structure */
StringPtr name; /* the name of the address book file */
} emsMakeAddressBookData;
/* ---------- Make Address Book Entry data ------------------------------ */
typedef struct emsMakeABEntryDataS
{
long size; /* Size of this data structure */
short which; /* where to put the address book entry */
Boolean isGroup; /* is this a group? */
StringPtr nickName; /* The name of the address book entry */
Handle addresses; /* the addresses */
Handle notes; /* the notes */
} emsMakeABEntryData;
/* ---------- Make Mailbox Data ---------------------------------------- */
typedef enum
{
EMS_IMPORT_MAILBOX_Start,
EMS_IMPORT_MAILBOX_Create_Mailbox,
EMS_IMPORT_MAILBOX_Flush_Mailbox,
EMS_IMPORT_MAILBOX_Done
} ImportMailboxOperationEnum;
typedef struct emsMakeMailboxDataS
{
long size; /* Size of this data structure */
ImportMailboxOperationEnum command; /* IN: what to do */
FSSpec boxSpec; /* IN/OUT: the mailbox to create */
Boolean isFolder; /* IN: is this mailbox a folder? */
Boolean noSelect; /* IN: is this mailbox a simple folder? */
} emsMakeMailboxData;
/* ---------- Make Out Message Data ------------------------------------ */
typedef struct emsMakeOutMessDataS
{
long size; /* Size of this data structure */
StringPtr fromAddress; // from address
Handle toAddresses; // addresses in the To: field
Handle ccAddresses; // addresses in the Cc: field
Handle bccAddresses; // addresses in the Bcc: field
StringPtr subject; // 255 characters of the subject
Handle text; // the text of the message
short numAttachments; // the total number of attachments
Handle attachSpecs; // the attachments
long inBoxNumber; // the mailbox the message is in
FSSpec boxSpec; // FSSpec of the mailbox
Boolean isSent; // Is this message a sent message?
long date; // the date this message was sent
} emsMakeOutMessData;
/* ---------- Make Message From Mime Data ----------------------------- */
typedef struct emsMakeMessageDataS
{
long size; /* Size of this data structure */
short ref; /* where the data is coming from */
long offset; /* offset into the file where the message can be found */
long len; /* length of the message to be read */
short state; /* the message state the plugin believes to see */
FSSpec boxSpec; /* where the message should end up */
Handle attachments; /* the attachments to be stuck into this message */
} emsMakeMessageData;
#if GENERATINGCFM
typedef UniversalProcPtr emsMakeSig, emsMakeSigUPP; /* Power PC */
enum { emsMakeSigProcInfo = kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(short)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(emsMakeSigData *))) };
#define NewEMSMakeSigProc(userRoutine) \
(emsMakeSigUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
emsMakeSigProcInfo, GetCurrentArchitecture())
#define CallEMSMakeSigProc(userRoutine, data) \
CallUniversalProc((UniversalProcPtr)(userRoutine), emsMakeSigProcInfo, (data))
#else
typedef pascal short (*emsMakeSig)(emsMakeSigData *); /* 68K */
#define NewEMSMakeSigProc(userRoutine) ((emsMakeSigUPP) (userRoutine)))
#define CallEMSMakeSigProc(userRoutine, data) (*(userRoutine))((data))
#endif
#if GENERATINGCFM
typedef UniversalProcPtr emsMakeAddressBook, emsMakeAddressBookUPP; /* Power PC */
enum { emsMakeAddressBookProcInfo = kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(short)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(emsMakeAddressBookData *))) };
#define NewEMSMakeAddressBookProc(userRoutine) \
(emsMakeAddressBookUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
emsMakeAddressBookProcInfo, GetCurrentArchitecture())
#define CallEMSMakeAddressBookProc(userRoutine, data) \
CallUniversalProc((UniversalProcPtr)(userRoutine), emsMakeAddressBookProcInfo, (data))
#else
typedef pascal short (*emsMakeAddressBook)(emsMakeAddressBookData *); /* 68K */
#define NewEMSMakeAddressBookProc(userRoutine) ((emsMakeAddressBookUPP) (userRoutine)))
#define CallEMSMakeAddressBookProc(userRoutine, data) (*(userRoutine))((data))
#endif
#if GENERATINGCFM
typedef UniversalProcPtr emsMakeABEntry, emsMakeABEntryUPP; /* Power PC */
enum { emsMakeABEntryProcInfo = kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(short)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(emsMakeABEntryData *))) };
#define NewEMSMakeABEntryProc(userRoutine) \
(emsMakeABEntryUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
emsMakeABEntryProcInfo, GetCurrentArchitecture())
#define CallEMSMakeABEntryProc(userRoutine, data) \
CallUniversalProc((UniversalProcPtr)(userRoutine), emsMakeABEntryProcInfo, (data))
#else
typedef pascal short (*emsMakeABEntry)(emsMakeABEntryData *); /* 68K */
#define NewEMSMakeABEntryProc(userRoutine) ((emsMakeABEntryUPP) (userRoutine)))
#define CallEMSMakeABEntryProc(userRoutine, data) (*(userRoutine))((data))
#endif
#if GENERATINGCFM
typedef UniversalProcPtr emsMakeMailbox, emsMakeMailboxUPP; /* Power PC */
enum { emsMakeMailboxProcInfo = kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(short)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(emsMakeMailboxData *))) };
#define NewEMSMakeMailboxProc(userRoutine) \
(emsMakeMailboxUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
emsMakeMailboxProcInfo, GetCurrentArchitecture())
#define CallEMSMakeMailboxProc(userRoutine, data) \
CallUniversalProc((UniversalProcPtr)(userRoutine), emsMakeMailboxProcInfo, (data))
#else
typedef pascal short (*emsMakeMailbox)(emsMakeMailboxData *); /* 68K */
#define NewEMSMakeMailboxProc(userRoutine) ((emsMakeMailboxUPP) (userRoutine)))
#define CallEMSMakeMailboxProc(userRoutine, data) (*(userRoutine))((data))
#endif
typedef struct emsMakeOutMessDataS *emsMakeOutMessDataP, **emsMakeOutMessDataH;
#if GENERATINGCFM
typedef UniversalProcPtr emsMakeOutMess, emsMakeOutMessUPP; /* Power PC */
enum { emsMakeOutMessProcInfo = kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(short)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(emsMakeOutMessData *))) };
#define NewEMSMakeOutMessProc(userRoutine) \
(emsMakeOutMessUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
emsMakeOutMessProcInfo, GetCurrentArchitecture())
#define CallEMSMakeOutMessProc(userRoutine, data) \
CallUniversalProc((UniversalProcPtr)(userRoutine), emsMakeOutMessProcInfo, (data))
#else
typedef pascal short (*emsMakeOutMess)(emsMakeOutMessData *); /* 68K */
#define NewEMSMakeOutMessProc(userRoutine) ((emsMakeOutMessUPP) (userRoutine)))
#define CallEMSMakeOutMessProc(userRoutine, data) (*(userRoutine))((data))
#endif
typedef struct emsMakeMessageDataS *emsMakeMessageDataP, **emsMakeMessageDataH;
#if GENERATINGCFM
typedef UniversalProcPtr emsMakeMessage, emsMakeMessageUPP; /* Power PC */
enum { emsMakeMessageProcInfo = kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(short)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(emsMakeMessageData *))) };
#define NewEMSMakeMessageProc(userRoutine) \
(emsMakeMessageUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
emsMakeMessageProcInfo, GetCurrentArchitecture())
#define CallEMSMakeMessageProc(userRoutine, data) \
CallUniversalProc((UniversalProcPtr)(userRoutine), emsMakeMessageProcInfo, (data))
#else
typedef pascal short (*emsMakeMessage)(emsMakeMessageData *); /* 68K */
#define NewEMSMakeMessageProc(userRoutine) ((emsMakeMessageUPP) (userRoutine)))
#define CallEMSMakeMessageProc(userRoutine, data) (*(userRoutine))((data))
#endif
/* ========== IMPORTER DATA STRUCTURES =================================== */
/* ---------- Importer Plugin Information ------------------------------- */
typedef struct emsImporterS *emsImporterP, **emsImporterH;
typedef struct emsImporterS {
long size; /* Size of this data structure */
long id; /* ID of translator to get info for */
long type; /* translator type, e.g., EMST_xxx */
unsigned long flags; /* translator flags */
StringHandle desc; /* translator string description */
Handle icon; /* translator icon data */
} emsImporter;
/* ---------- Importer Data --------------------------------------------- */
typedef enum
{
EMS_IMPORT_Name_Query,
EMS_IMPORT_Query,
EMS_IMPORT_Settings,
EMS_IMPORT_Signatures,
EMS_IMPORT_Addresses,
EMS_IMPORT_Mail
} ImportOperationEnum;
typedef struct emsImporterDataS *emsImporterDataP, **emsImporterDataH;
typedef struct emsImporterDataS {
long size; /* Size of this data structure */
ImportOperationEnum what; /* import operation selector */
void *params; /* parameters for the operation */
void *results; /* results of the opertaion */
} emsImporteData;
/* structure describing where an importable data store is */
typedef struct ImportAccountInfoS ImportAccountInfoS, *ImportAccountInfoP, **ImportAccountInfoH;
typedef struct ImportAccountInfoS
{
long size; /* IN: Size of this data structure */
FSSpec importSpec; /* spec pointing to folder or file to import */
Str63 accountName; /* name of account */
Str63 appName; /* name of Application */
Handle icon; /* Application icon data */
long id; /* The importer that will actually do the work */
} ImportAcountInfo;
/* Structure to hold all information about an imported personality */
typedef struct ImportPersDataS *ImportPersDataP, **ImportPersDataH;
typedef struct ImportPersDataS
{
long size; /* IN: Size of this data structure */
long makeDominant; /* Is this the main account? */
Str255 accountName; /* The name of the personality to be created */
Str255 returnAddress; /* return address */
Str255 realName; /* real name */
Str255 userName; /* username */
Str255 mailServer; /* mail server */
Str255 smtpServer; /* smtp server */
Boolean isIMAP; /* is this an IMAP account? */
} ImportPersData;
/* Structure to pass all the information needed to import signatures */
typedef struct ImportSignaturesDataS ImportSignaturesDataS, *ImportSignaturesDataP, **ImportSignaturesDataH;
typedef struct ImportSignaturesDataS
{
long size; /* IN: Size of this data structure */
FSSpec importSpec; /* Spec pointing to the folder or file to import */
emsMakeSig makeSig; /* Callback to actually create the signature file */
emsProgress progress; /* Callback for progress */
} ImportSignaturesData;
/* Structure to pass all the information needed to import addresses */
typedef struct ImportAddressDataS ImportAddressDataS, *ImportAddressDataP, **ImportAddressDataH;
typedef struct ImportAddressDataS
{
long size; /* IN: Size of this data structure */
FSSpec importSpec; /* Spec pointing to the folder or file to import */
Str63 accountName; /* name of the account */
emsMakeAddressBook makeAddressBook; /* Callback to create an address book file */
emsMakeABEntry makeABEntry; /* Callback to create an address book entry */
emsProgress progress; /* Callback for progress */
} ImportAddressData;
/* Structure to pass all the information needed to import messages and mailboxes */
typedef struct ImportMailDataS ImportMailDataS, *ImportMailDataP, **ImportMailDataH;
typedef struct ImportMailDataS
{
long size; /* IN: Size of this data structure */
FSSpec importSpec; /* Spec pointing to the folder or file to import */
Str63 accountName; /* name of the account */
emsMakeMailbox makeMailbox; /* Callback to create a mailbox */
emsMakeOutMess makeOutMess; /* Callback to create an outgoing message */
emsMakeMessage makeMessage; /* Callback to read MIME encoded messages */
emsProgress progress; /* Callback for progress */
} ImportMailData;
/* ========== Importer FUNCTION PROTOTYPES =============================== */
/* ---------- Get details about an importer in a plugin ------------------ */
pascal long ems_importer_info(
Handle globals, /* Out: Return for allocated instance structure */
emsImporterP importerInfo /* In/Out: Return Importer Information */
);
/* ---------- Call an importer hook -------------------------------------- */
pascal long ems_importer_hook(
Handle globals, /* Out: Return for allocated instance structure */
emsImporterDataP importerData /* In/Out: Return Importer Data */
);
#endif /* EMSAPI_MAC_H_INCLUDED */